{% extends '@WebsiteBundle/layout/layout.html.twig' %}

 {% block page %}
     {{ parent() }}
   <div id="main">
     <div class="layui-fluid loginBg">
        <div class="layui-main">
          <div class="layui-row">
            <div class="layui-col-md8">&nbsp;</div>
            <div class="layui-col-md4">
              <div class="layui-box loginBox">
                <div class="layui-card nonebox-shadow">
                  <div class="layui-card-header">登录/注册</div>
                  <div class="layui-card-body" style="padding: 10px!important;">
                    <form class="layui-form ajaxform needs-validation" action="{{ path('app_logindo') }}" method="post" novalidate>
                      <div class="layui-form-item">
                        <input type="text" name="mobile" id="smsmobile" value="{{ mobile }}" placeholder="请输入手机号码" autocomplete="off" class="layui-input">
                      </div>

                      <div class="layui-form-item">
                        <div class="layui-inline">
                          <input type="text" name="code"  value="" placeholder="短信验证码" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-inline">
                          <a class="layui-btn layui-btn-primary" id="smssend">点击发送验证码</a>
                        </div>
                      </div>

                      <div class="layui-form-item">
                        <div style="margin: 10px 0px;">
                          提交表示同意 <a href="#">《用户协议》</a>
                        </div>
                        <input type="hidden" name="_csrf_token"
                               value="{{ csrf_token('authenticate') }}"
                        >
                        <input type="hidden" name="goto" value="{{ goto }}">
                        <input type="hidden" id="remember" name="_remember_me" value="1">
                        <button class="layui-btn  layui-btn-normal layui-btn-fluid" type="submit" >提交</button>
                        <div  style="margin-top: 10px;color: red">
                          未注册手机号码提交后将自动注册
                        </div>
                      </div>
                    </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
     </div>
   </div>

   <!-- 短信验证码弹框 -->
   <form class="layui-form ajaxsmsform layui-hide model" id="sms_model" method="post" action="{{ path('app_glob_sendCaptcha') }}">
         <div class="layui-form-item">
           请填写图形验证码后获取短信验证码
         </div>
         <div class="layui-form-item">
           <div class="layui-inline">
           <input  autocomplete="off" class="layui-input" type="text" name="imgCode" placeholder="图片验证码">
           </div>
           <div class="layui-inline">
             <img  src="{{ path('app_glob_recaptcha', {type:'siteSmsLogin'}) }}"  id="recaptcha_sms_login"  alt="点击图片更换验证码">
           </div>
         </div>
         <div class="layui-form-item">
           <input type="hidden" name="mobile" value="" id="mobilesend">
           <input type="hidden" name="type" value="siteSmsLogin">
           <button type="submit" class="layui-btn  layui-btn-normal layui-btn-fluid">免费获取短信验证码</button>
         </div>
       </div>
   </form>

 {% endblock %}

{% block body_custom_javascript %}
  {{ parent() }}
  <script src="{{ asset('bundles/eduxpluswebsite/default/js/pages/user/login.js') }}"></script>
{% endblock %}

